<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			alert(getSum(100));
			function getSum(n){
				if(n<1){
					return 0;
				}
				return n + getSum(n-1);
			}
			
			getSum(100) = 100 + 99 + 98 + ... + 1 + 0;
			
			function getSum(n){
				if(n<1){
					return 0;
				}
				return 100 + 99 + ... + 1 + 0;
			}
		</script>
	</body>
</html>
